server:
    port: <#noparse>${service.port:</#noparse>${cfg.port}}
<#if cfg.mybatis>
# mybatis-plus配置 实体类扫描和xml文件扫描
mybatis-plus:
    type-aliases-package: ${package.Entity}
    mapper-locations: classpath:/mapper/*.xml
</#if>
<#if cfg.feign>
feign:
  client:
    config:
      default:
        connectTimeout: 5000 # 连接超时时间
        readTimeout: 5000   # 读超时时间
        loggerLevel: BASIC # 日志级别
</#if>
<#if cfg.mybatis || !cfg.extraCfg  >
spring:
    datasource:
        druid:
            type: com.alibaba.druid.pool.DruidDataSource
            driver-class-name: ${cfg.dbDriver}
            url: ${cfg.dbUrl}
            username: ${cfg.dbUserName}
            password: ${cfg.dbPwd}
            # 打开PSCache，并且指定每个连接上PSCache的大小
            pool-prepared-statements: true
            max-open-prepared-statements: 20
            max-pool-prepared-statement-per-connection-size: 20
            # 配置监控统计拦截的filters, 去掉后监控界面sql无法统计, 'wall'用于防火墙
            filters: stat
            # Spring监控AOP切入点，如x.y.z.service.*,配置多个英文逗号分隔
            aop-patterns: com.springboot.servie.*
            # WebStatFilter配置
            web-stat-filter:
                enabled: true
                # 添加过滤规则
                url-pattern: /*
                # 忽略过滤的格式
                exclusions: '*.js,*.gif,*.jpg,*.png,*.css,*.ico,/druid/*'
            # StatViewServlet配置
            stat-view-servlet:
                enabled: true
                # 访问路径为/druid时，跳转到StatViewServlet
                url-pattern: /druid/*
                # 是否能够重置数据
                reset-enable: false
                # 需要账号密码才能访问控制台
                login-username: admin
                login-password: 123456
            filter:
                stat:
                    log-slow-sql: true
logging:
   level:
        source.mapper: debug #日志打印
        root: info
</#if>
